import apis from '../../http/apis/apis'
export default {
    namespaced:'tenants',
    state:{
        tenantsData:[],
        data:{
            currentpage:1,
            pagesize:5,
        }
    },
    mutations:{
        changeTenantsData(state,data){
            state.tenantsData=data
        }
    },
    actions:{
        async getTenants(context){
            const {data} = await apis.tenants.getTenants()
            context.commit('changeTenantsData',data.data)
            console.log(context.state.tenantsData);
        }
    }
}